package com.liwei.blog.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

import com.liwei.blog.dao.UserDao;

/** 
* @author 作者 liwei: 
* @version 创建时间：2018年12月4日 下午1:16:43 
*  安全登陆验证
*/
@Service
public class LoginserviceImpl implements UserDetailsService {

	@Autowired
	UserDao userDao;
	@Override
	public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
		// TODO Auto-generated method stub
		return userDao.findByUsername(username);
	}

}
